Get a list of orders in Yandex Eats
Use this request to get a list of orders in Yandex Eats.
Request syntax
POST https://b2b-api.go.yandex.ru/integration/2.0/orders/eats/list?limit=<number of orders>
Request headers
Authorization: Bearer <OAuth-token>
OAuth access token. The steps to get a token are described in Getting started.
X-YaTaxi-Selected-Corp-Client-Id— client ID from the account. Required if multiple clients are available using the token.
Request parameters
The request may contain the following optional parameters:
limit: Number of orders to display. If this parameter is omitted, the system returns information about the first 150 orders.cursor: Request tag (returned in the body of the response to the previous request). You don't need to specify this parameter for the first page request, but you need to do it for all subsequent pages.
Request body
Data is transmitted in the request body in JSON format:
|
Field |
Description |
Format |
Required |
|
|
Array of IDs of employees who placed orders. |
Array |
Yes |
Response field description
Responses may contain the following fields:
| Field | Description | Format |
|---|---|---|
cursor |
The tag of the current request. | String |
limit |
The maximum number of records to return. | Number |
orders |
The list of orders with their description. | Array of objects |
sorting_order |
The sort direction of the array of orders (by order creation date). | String |
Structure of the orders array element:
| Field | Description | Format |
|---|---|---|
id |
The order ID. | String |
user_id |
The user's ID. | String |
status |
Order status. | String |
created_at |
Date and time of the order. Value format: YYYY-MM-DDThh:mm:ss±hh:mm. |
String |
closed_at |
Date and time of order completion. Value format: YYYY-MM-DDThh:mm:ss±hh:mm. |
String |
restaurant_name |
Name of the restaurant. | String |
destination_address |
Order delivery address. | String |
restaurant_address |
Restaurant details. | Array of objects |
order_calculation |
Order contents. | Array of objects |
final_cost |
Price without VAT. Returns only for a completed order. | String |
vat |
VAT. Returns only for a completed order. | String |
cost_with_vat |
Price with VAT. Returns only for a completed order. | String |
currency |
Currency. | String |
Structure of the restaurant_address array element:
| Field | Description | Format |
|---|---|---|
title |
Attribute name. | String |
value |
Attribute value. | String |
Structure of the order_calculation array element:
| Field | Description | Format |
|---|---|---|
name |
Dish name. | String |
vat |
VAT. Returns only for a completed order. | String |
cost_with_vat |
Price with VAT. Returns only for a completed order. | String |
modifiers |
Additions to the dish. | String |
count |
Quantity. | String |
Request example
The first request:
POST https://b2b-api.go.yandex.ru/integration/2.0/orders/eats/list?limit=2
...
Authorization: Bearer <OAuth token>
{
"user_ids": [
"b201...a4bc"
]
}
Subsequent requests:
POST https://b2b-api.go.yandex.ru/integration/2.0/orders/eats/list?limit=2&cursor=djEg...M3OT
...
Authorization: Bearer <OAuth token>
{
"user_ids": [
"b201...a4bc"
]
}
Response example
Response example:
{
"cursor": "1676209440.0-230212-6600939",
"limit": 2,
"orders": [
{
"id": "230218-1509473",
"user_id": "b201...a4bc",
"status": "delivered",
"created_at": "2023-02-18T11:42:10+03:00",
"closed_at": "2023-02-18T12:42:45+03:00",
"restaurant_name": "Zotman Pizza",
"destination_address": "40A Myasnitskaya Street",
"restaurant_address": [
{
"title": "Name",
"value": "\ZOTMAN PARTNERS\ LIMITED LIABILITY COMPANY"
},
{
"title": "OGRN",
"value": "1207700191874"
},
{
"title": "Address",
"value": "123376, 123376 Moscow, 15 Rochdelskaya Street, building 32, area IV, room 32"
},
{
"title": "Business hours",
"value": "Mon: 11:00–23:00\nTue: 11:00–23:00\nWed: 11:00–23:00\nThu: 11:00–23:00\nFri: 11:00–23:00\nSat: 11:00–23:00\nSun: 11:00–23:00"
}
],
"order_calculation": [
{
"name": "Pesto chicken",
"cost": "590.",
"vat": "118.0000",
"cost_with_vat": "708.0000",
"modifiers": [],
"count": 1
},
{
"name": "Delivery",
"cost": "59.",
"vat": "11.8000",
"cost_with_vat": "70.8000"
}
],
"final_cost": "688.0000",
"vat": "137.6000",
"final_cost_with_vat": "825.6000",
"currency": "RUB"
},
{
"id": "230212-6600939",
"user_id": "b201...a4bc",
"status": "delivered",
"created_at": "2023-02-12T19:44:00+03:00",
"closed_at": "2023-02-12T20:59:54+03:00",
"restaurant_name": "Lepim i Varim",
"destination_address": "40A Myasnitskaya Street",
"restaurant_address": [
{
"title": "Name",
"value": "Individual Entrepreneur Karapetyan Ermine Kamoevna"
},
{
"title": "OGRNIP",
"value": "321508100663111"
}
],
"order_calculation": [
{
"name": "Traditional large portion",
"cost": "430.",
"vat": "86.0000",
"cost_with_vat": "516.0000",
"modifiers": [],
"count": 1
},
{
"name": "Delivery",
"cost": "223.",
"vat": "44.6000",
"cost_with_vat": "267.6000"
}
],
"final_cost": "692.0000",
"vat": "138.4000",
"final_cost_with_vat": "830.4000",
"currency": "RUB"
}
],
"sorting_order": "desc"
}
Response codes
The response to this request may contain the following standard HTTP codes:
200: Request completed successfully.400: An unknown parameter or a parameter with an invalid value was passed in the request.403:- SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header
X-YaTaxi-Selected-Corp-Client-Id(returned if more than one client is available for the token). - SELECTED_CLIENT_ACCESS_DENIED: the header
X-YaTaxi-Selected-Corp-Client-Idcontains the client's ID, which this login does not have access to.
- SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header